﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SnmpForm.ApTrust
{
    public partial class frmApTrustAdd : frmApTrust
    {
        public frmApTrustAdd()
        {
            InitializeComponent();

            ucApTrust1.bSnmpAccountEnable = true;
        }

        public override bool SaveToDb()
        {
            bool bSucess = false;
            if (ucApTrust1.Update(false))
            {
                bSucess = BusinessWrapper.User.Instance.CreateAp(ucApTrust1.GetInfo());
            }
            return bSucess;
        }

        private void buttonAdd_Click(object sender, EventArgs e)
        {
            if (SaveToDb())
            {
                MessageBox.Show("创建成功");
                Close();
            }
        }
    }
}
